package ru.beta2.testyard.engine;

import ru.beta2.testyard.ExpectMessageScript;
import ru.beta2.testyard.MessageListener;
import ru.beta2.testyard.Script;

/**
 * User: Inc
 * Date: 07.07.2008
 * Time: 7:26:37
 */
//public class ExpectMessagePinnedScript<T> extends PinnedScript implements ExpectMessageScript<T>
public class ExpectMessagePinnedScript extends PinnedScript implements ExpectMessageScript
{

//    private final ExpectMessageScript<T> pinned;

    ExpectMessagePinnedScript(Script pinned)
    {
        super(pinned);
//        this.pinned = pinned;
    }

    public boolean isAcquired()
    {
        throw new IllegalStateException("isAcquired() is not supported in pin mode");
//        return pinned.isAcquired();
    }

    public Object getActualMessage()
    {
        throw new IllegalStateException("getActualMessage() is not supported in pin mode");
//        return pinned.getActualMessage();
    }

    public void registerMessageListener(MessageListener listener)
    {
        throw new IllegalStateException("registerMessageListener() is not supported in pin mode");
    }
}
